package com.springboot.study.listener;

import org.springframework.boot.context.event.SpringApplicationEvent;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;

/**
 * @Author: guodong
 * @Date: 2021/5/13 11:41
 * @Version: 1.0
 * @Description:
 */
@Configuration
public class Config {

    @EventListener(classes = {SpringApplicationEvent.class})
    public void listen(SpringApplicationEvent event) {
        System.out.println("注解事件触发：" + event.getClass().getName());
    }

}